package io.renren.modules.student.service.impl;

import io.renren.modules.student.dao.StuPersonInfoDao;
import io.renren.modules.student.service.StuPersonInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;
@Service
public class StuPersonInfoServiceImpl implements StuPersonInfoService {
    @Autowired
    private StuPersonInfoDao stuPersonInfoDao;
    /*
    得到基本信息
     */
    @Override
    public Map<String, Object> queryBaseInfo(String param) {
        Map<String, Object> result =stuPersonInfoDao.queryBaseInfo(param);
        return result;
    }
    /*
    更新基本信息
     */

    @Override
    public void updateBaseInfo(Map<String, Object> formData) {
        //更新学生表
         stuPersonInfoDao.updateBaseInfo(formData);
       //更新user表
         stuPersonInfoDao.updateUser(formData);
    }

    @Override
    public void saveIcon(Map<String, Object> iconUrl) {
        stuPersonInfoDao.saveIcon(iconUrl);//学生表添加图像
        stuPersonInfoDao.saveIconUser(iconUrl);//sys_user添加头像
    }

}
